<template>
    <el-form ref="auditProcessSearchForm" :model="auditProcessSearch" label-width="100px" :inline="true" size="small">
        <el-form-item label="流程名称" prop="processName">
            <el-input v-model="auditProcessSearch.processName"></el-input>
        </el-form-item>
        <el-form-item label="流程类型" prop="processType">
            <el-select v-model="auditProcessSearch.processType" placeholder="流程类型">
                <el-option label="全部流程" value="ALL" />
                <el-option label="公共流程" value="PUBLIC_TYPE" />
                <el-option label="企业流程" value="TENANT_TYPE" />
                <el-option label="部门流程" value="COMPANY_TYPE" />
            </el-select>
        </el-form-item>
        <el-form-item class="btn">
            <el-button type="primary" icon="el-icon-search" @click="onSearch">搜索</el-button>
            <el-button icon="el-icon-refresh" @click="reset">重置</el-button>
        </el-form-item>
    </el-form>
</template>
  
<script>
export default {
    props: {
        auditProcessSearch: {
            type: Object,
            required: true,
        },
    },
    methods: {
        onSearch() {
            this.$emit("onSearch");
        },
        reset() {
            this.$refs.auditProcessSearchForm.resetFields();
        }
    },
    beforeDestroy() {
        this.$refs.auditProcessSearchForm.resetFields();
    }
};
</script>
  
<style scoped lang="scss">
.el-button {
    padding-left: 25px;
    padding-right: 30px;
}

.btn {
    margin-left: 30px;
}
</style>
  